package com.only4play.usercenter.config;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author liyuncong
 * @version 1.0
 * @file GatewayConfiguration
 * @brief 网关配置文件
 * @details 网关配置文件
 * @date 2024-02-08
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                     NAME               DESCRIPTION
 * 2024-02-08               liyuncong          Created
 */

@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@RefreshScope
@Component
@ConfigurationProperties(prefix = "usercenter.gateway")
public class GatewayConfiguration {

    // 接口签名配置
    private Signature signature;

    @AllArgsConstructor
    @NoArgsConstructor
    @Getter
    @Setter
    public static class Signature {
        private boolean enable = false;
        private boolean useTimestamp = false;
        private Map<String, String> appKeys;
    }
}
